{$taxonomy}_term_edit_form_top
Action HookDescription
Fires at the beginning of the Edit Term form. At this point, the required hidden fields and nonces have already been output. The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. Possible hook names include: - `category_term_edit_form_top` - `post_tag_term_edit_form_top`Hook Information
File Location |
wp-admin/edit-tag-form.php
View on GitHub
|
Hook Type | Action |
Line Number | 141 |
Hook Parameters
Type | Name | Description |
---|---|---|
WP_Term
|
$tag
|
Current taxonomy term object. |
string
|
$taxonomy
|
Current $taxonomy slug. |
Usage Examples
Basic Usage
<?php
// Hook into {$taxonomy}_term_edit_form_top
add_action('{$taxonomy}_term_edit_form_top', 'my_custom_function', 10, 2);
function my_custom_function($tag, $taxonomy) {
// Your custom code here
}
Source Code Context
wp-admin/edit-tag-form.php:141
- How this hook is used in WordPress core
<?php
136 * @since 4.5.0
137 *
138 * @param WP_Term $tag Current taxonomy term object.
139 * @param string $taxonomy Current $taxonomy slug.
140 */
141 do_action( "{$taxonomy}_term_edit_form_top", $tag, $taxonomy );
142
143 $tag_name_value = '';
144 if ( isset( $tag->name ) ) {
145 $tag_name_value = esc_attr( $tag->name );
146 }
PHP Documentation
<?php
/**
* Fires at the beginning of the Edit Term form.
*
* At this point, the required hidden fields and nonces have already been output.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* Possible hook names include:
*
* - `category_term_edit_form_top`
* - `post_tag_term_edit_form_top`
*
* @since 4.5.0
*
* @param WP_Term $tag Current taxonomy term object.
* @param string $taxonomy Current $taxonomy slug.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-admin/edit-tag-form.php
Related Hooks
Related hooks will be displayed here in future updates.